home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsPIPluginHost.idl < prev    next >
Encoding:
Text File  |  2006-05-08  |  4.1 KB  |  97 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsISupports.idl"
  39. #include "nsIPluginInstance.idl"
  40.  
  41. %{C++
  42. #include "nsPluginNativeWindow.h"
  43. %}
  44.  
  45. [ptr] native nsPluginNativeWindowPtr(nsPluginNativeWindow);
  46.  
  47. [uuid(8e3d71e6-2319-11d5-9cf8-0060b0fbd8ac)]
  48. interface nsPIPluginHost : nsISupports
  49. {
  50.  /**
  51.   * To notify the plugin manager that the plugin created a script object 
  52.   */
  53.   void setIsScriptableInstance(in nsIPluginInstance aInstance, in boolean aScriptable);
  54.  
  55.  /**
  56.   * This method parses post buffer to find out case insensitive "Content-length" string
  57.   * and CR or LF some where after that, then it assumes there is http headers in
  58.   * the input buffer and continue to search for end of headers (CRLFCRLF or LFLF).
  59.   * It will *always malloc()* output buffer (caller is responsible to free it) 
  60.   * if input buffer starts with LF, which comes from 4.x spec 
  61.   * http://developer.netscape.com/docs/manuals/communicator/plugin/pgfn2.htm#1007754
  62.   * "If no custom headers are required, simply add a blank
  63.   * line ('\n') to the beginning of the file or buffer.",
  64.   * it skips that '\n' and considers rest of the input buffer as data.
  65.   * If "Content-length" string and end of headers is found 
  66.   *   it substitutes single LF with CRLF in the headers, so the end of headers
  67.   *   always will be CRLFCRLF (single CR in headers, if any, remain untouched)
  68.   * else
  69.   *   it puts "Content-length: "+size_of_data+CRLFCRLF at the beginning of the output buffer
  70.   * and memcpy data to the output buffer 
  71.   *
  72.   * On failure outPostData and outPostDataLen will be set in 0.  
  73.   * @param aInPostData      - the post data
  74.   * @param aInPostDataLen   - the length aInPostData
  75.   * @param aOutPostData     - the buffer
  76.   * @param aOutPostDataLen  - the length of aOutPostData
  77.   **/
  78.   void parsePostBufferToFixHeaders(in string aInPostData, 
  79.                                    in unsigned long aInPostDataLen, 
  80.                                    out string aOutPostData, 
  81.                                    out unsigned long aOutPostDataLen);
  82.  /**
  83.   * To create tmp file with Content len header in, it will use by http POST
  84.   */
  85.   void createTmpFileToPost(in string aPostDataURL, out string aTmpFileName);
  86.  
  87.  /**
  88.   *  Creates a new plugin native window object
  89.   */
  90.   void newPluginNativeWindow(out nsPluginNativeWindowPtr aPluginNativeWindow);
  91.  
  92.  /**
  93.   *  Deletes plugin native window object created by NewPluginNativeWindow
  94.   */
  95.   void deletePluginNativeWindow(in nsPluginNativeWindowPtr aPluginNativeWindow);
  96. };
  97.